package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 出入库明细对象 inventory_transaction_details
 *
 * @author ruoyi
 * @date 2025-05-30
 */
public class InventoryTransactionDetails extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 开始时间，记录查询或操作的起始时间（如果适用） */
    @Excel(name = "开始时间，记录查询或操作的起始时间", readConverterExp = "如=果适用")
    private Date startTime;

    /** 结束时间，记录查询或操作的结束时间（如果适用） */
    @Excel(name = "结束时间，记录查询或操作的结束时间", readConverterExp = "如=果适用")
    private Date endTime;

    /** 出入库类型，默认为全部 */
    @Excel(name = "出入库类型，默认为全部")
    private String transactionType;

    /** 出入库单号，唯一标识一次出入库操作 */
    @Excel(name = "出入库单号，唯一标识一次出入库操作")
    private String transactionNumber;

    /** 仓库，记录出入库操作发生的仓库 */
    @Excel(name = "仓库，记录出入库操作发生的仓库")
    private String warehouseName;

    /** 类别，默认为全部 */
    @Excel(name = "类别，默认为全部")
    private String category;

    /** 分类，用于进一步细分商品类别 */
    @Excel(name = "分类，用于进一步细分商品类别")
    private String subcategory;

    /** 商品查询条件或筛选条件（这里以文本形式存储，实际使用时可能需要根据具体查询逻辑调整） */
    @Excel(name = "商品查询条件或筛选条件", readConverterExp = "这=里以文本形式存储，实际使用时可能需要根据具体查询逻辑调整")
    private String productQueryFilter;

    /** 类型，这里可以存储更具体的出入库类型（如采购入库、销售出库等），如果不需要可以省略或调整 */
    @Excel(name = "类型，这里可以存储更具体的出入库类型", readConverterExp = "如=采购入库、销售出库等")
    private String specificType;

    /** 变动时间，记录库存实际发生变动的时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "变动时间，记录库存实际发生变动的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    /** 名称，记录商品的名称 */
    @Excel(name = "名称，记录商品的名称")
    private String productName;

    /** 规格，描述商品的规格信息 */
    @Excel(name = "规格，描述商品的规格信息")
    private String specification;

    /** 编号，唯一标识商品 */
    @Excel(name = "编号，唯一标识商品")
    private String productCode;

    /** 单位，例如：个、箱、千克等 */
    @Excel(name = "单位，例如：个、箱、千克等")
    private String unit;

    /** 变动前库存，记录变动前该商品的库存数量 */
    @Excel(name = "变动前库存，记录变动前该商品的库存数量")
    private Long previousInventory;

    /** 变动数量，记录本次出入库的商品数量 */
    @Excel(name = "变动数量，记录本次出入库的商品数量")
    private Long changeQuantity;

    /** 库存单价，记录变动时的商品单价 */
    @Excel(name = "库存单价，记录变动时的商品单价")
    private BigDecimal unitPrice;

    /** 总额，记录本次出入库的商品总价值（变动数量 * 库存单价） */
    @Excel(name = "总额，记录本次出入库的商品总价值", readConverterExp = "变=动数量,*=,库=存单价")
    private BigDecimal totalAmount;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }

    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }

    public void setTransactionType(String transactionType)
    {
        this.transactionType = transactionType;
    }

    public String getTransactionType()
    {
        return transactionType;
    }

    public void setTransactionNumber(String transactionNumber)
    {
        this.transactionNumber = transactionNumber;
    }

    public String getTransactionNumber()
    {
        return transactionNumber;
    }

    public void setWarehouseName(String warehouseName)
    {
        this.warehouseName = warehouseName;
    }

    public String getWarehouseName()
    {
        return warehouseName;
    }

    public void setCategory(String category)
    {
        this.category = category;
    }

    public String getCategory()
    {
        return category;
    }

    public void setSubcategory(String subcategory)
    {
        this.subcategory = subcategory;
    }

    public String getSubcategory()
    {
        return subcategory;
    }

    public void setProductQueryFilter(String productQueryFilter)
    {
        this.productQueryFilter = productQueryFilter;
    }

    public String getProductQueryFilter()
    {
        return productQueryFilter;
    }

    public void setSpecificType(String specificType)
    {
        this.specificType = specificType;
    }

    public String getSpecificType()
    {
        return specificType;
    }

    public void setChangeTime(Date changeTime)
    {
        this.changeTime = changeTime;
    }

    public Date getChangeTime()
    {
        return changeTime;
    }

    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }

    public void setSpecification(String specification)
    {
        this.specification = specification;
    }

    public String getSpecification()
    {
        return specification;
    }

    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }

    public String getProductCode()
    {
        return productCode;
    }

    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }

    public void setPreviousInventory(Long previousInventory)
    {
        this.previousInventory = previousInventory;
    }

    public Long getPreviousInventory()
    {
        return previousInventory;
    }

    public void setChangeQuantity(Long changeQuantity)
    {
        this.changeQuantity = changeQuantity;
    }

    public Long getChangeQuantity()
    {
        return changeQuantity;
    }

    public void setUnitPrice(BigDecimal unitPrice)
    {
        this.unitPrice = unitPrice;
    }

    public BigDecimal getUnitPrice()
    {
        return unitPrice;
    }

    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("transactionType", getTransactionType())
                .append("transactionNumber", getTransactionNumber())
                .append("warehouseName", getWarehouseName())
                .append("category", getCategory())
                .append("subcategory", getSubcategory())
                .append("productQueryFilter", getProductQueryFilter())
                .append("specificType", getSpecificType())
                .append("changeTime", getChangeTime())
                .append("productName", getProductName())
                .append("specification", getSpecification())
                .append("productCode", getProductCode())
                .append("unit", getUnit())
                .append("previousInventory", getPreviousInventory())
                .append("changeQuantity", getChangeQuantity())
                .append("unitPrice", getUnitPrice())
                .append("totalAmount", getTotalAmount())
                .append("phone", getPhone())
                .toString();
    }
}
